package com.xiaoy.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MsgManagerServlet extends BaseServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

//		DBInfoMysql mysql = DBInfoMysql.getInstance();
//		request.setAttribute("mysql", mysql);
//		request.getRequestDispatcher("index.jsp").forward(request, resp);
		response.setContentType(JSON_TYPE);
		try {
			response.getWriter().write("{\"result\":\"1\",\"data\":\"222\"}");
//			response.getOutputStream().print("[{\"result\":\"1\",\"data\":\"222\"}]");
//			response.getWriter().print(c);
			
//			response.getWriter().flush();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	
	}
	private final String	TEXT_TYPE				= "text/plain";
	private final String	JSON_TYPE				= "application/json";
	
}
